<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8"/>
        <title>{% if page.title %}{{ page.title }} - {% endif %}PHP 之道</title>
        <meta name="description" content="{{ page.description }}"/>
        <meta name="robots" content="index,follow,archive"/>
        <meta property="og:image:url" content="http://www.phptherightway.com/images/og-image.png"/>
        <meta property="og:image:width" content="1024"/>
        <meta property="og:image:height" content="640"/>
        <meta property="og:title" content="PHP: The Right Way"/>
        <meta property="og:description" content="An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative PHP tutorials around the Web"/>
        <meta property="og:url" content="http://www.phptherightway.com"/>
        <meta property="og:site_name" content="PHP: The Right Way"/>
        <meta property="og:type" content="website"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
        <link rel="icon" href="{{ site.baseurl }}images/favicon.png" type="image/png"/>
        <link rel="stylesheet" href="{{ site.baseurl }}styles/syntax.css">
        <style>
        *{box-sizing:border-box}body{font-size:24px;line-height:32px;text-rendering:optimizeLegibility}h1,h2,h3,h4{font-family:georgia,serif}h1,.alpha{position:relative;font-size:48px;font-weight:normal;line-height:50px;text-align:center}h2,.beta{font-size:32px;font-weight:normal;line-height:36px}h3,.gamma{font-size:24px;font-weight:bold;line-height:30px}blockquote{border-left:3px solid #ccc;padding-left:20px;color:#777;font-style:italic;word-wrap:break-word}a{color:#4f5b93}a:hover{color:#8892bf}.back-to-top{text-align:center}.back-to-top a{background:#4f5b93;border-radius:3px;display:inline-block;height:40px;padding:0 20px;transition:all .1s ease;color:white;font-family:verdana,sans-serif;font-size:13px;line-height:40px;text-decoration:none;text-transform:uppercase}.back-to-top a:hover{background:#8892bf}img{max-width:100%}pre,code{color:#444;font-family:"Source Code Pro",Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:90%}a pre,a code{color:inherit}pre{background:#f7f7f7;border:1px solid #eee;border-radius:3px;display:block;overflow:auto;padding:20px;width:100%}@media (max-width:767px){body{font-size:18px;line-height:24px}h1,.alpha{font-size:36px;line-height:38px}h2,.beta{font-size:24px;line-height:28px}h3,.gamma{font-size:18px;line-height:23px}blockquote{margin-left:0}ul,ol{padding-left:1em}pre{padding:5px 10px}}@media (max-width:360px){body{font-size:16px;line-height:21px}h1,.alpha{font-size:28px;line-height:30px}h2,.beta{font-size:20px;line-height:23px}h3,.gamma{font-size:16px;line-height:20px}}.site-header{padding-top:40px;margin-bottom:40px;text-align:center}.site-header h1{margin:0;font-size:72px;line-height:60px}.site-header h1 em{display:block;font-size:34px;font-style:normal}.site-header h1 a{color:#333;text-decoration:none}.site-header h1 a:hover{color:#8892bf}.site-header .build-date{margin-bottom:10px;color:#999;font-family:verdana,sans-serif;font-size:11px;text-transform:uppercase}.site-header .btn-share{background:#8892bf;border-radius:3px;display:inline-block;height:30px;padding:0 20px;vertical-align:baseline;color:white;font-family:verdana,sans-serif;font-size:12px;line-height:30px;text-decoration:none;text-transform:uppercase}.site-header .fork-me{background-image:url();background-position:top right;background-repeat:no-repeat;background-size:contain;height:100px;width:100px;position:absolute;top:0;right:0;z-index:100;width:120px}.site-navigation,.site-content,.site-footer{margin:0 auto;max-width:840px;width:92%}.site-navigation{-webkit-columns:3;-moz-columns:3;columns:3;-webkit-column-gap:40px;-moz-column-gap:40px;column-gap:40px}.site-navigation input[type="checkbox"],.site-navigation label{display:none}.site-navigation ul{list-style:none;margin:0;padding:0}.site-navigation ul li{margin-bottom:20px;font-size:22px;line-height:23px}.site-navigation ul li a{display:block;color:#444;font-weight:700;text-decoration:none}.site-navigation ul li a:hover{color:#8892bf}.site-navigation ul li ul{padding-top:8px}.site-navigation ul li li{margin-bottom:6px;font-size:18px}.site-navigation ul li li a{border:none;color:#777;font-weight:normal}.site-navigation li{-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}@media (max-width:820px){.site-navigation{-webkit-columns:2;-moz-columns:2;columns:2}}@media (max-width:560px){.site-navigation{-webkit-columns:1;-moz-columns:1;columns:1}}@media (max-width:375px){.site-navigation{background:rgba(255,255,255,0.95);-webkit-columns:1;-moz-columns:1;columns:1;max-height:100vh;position:fixed;bottom:0;left:0;z-index:100}.site-navigation label{background:#4f5b93;box-sizing:border-box;display:block;height:40px;padding:0 10px;width:100vh;position:absolute;bottom:0;left:0;color:white;font-family:verdana,sans-serif;font-size:13px;line-height:40px;text-transform:uppercase;z-index:2}.site-navigation>ul{background:rgba(255,255,255,0.96);border-top:3px solid #8892bf;box-shadow:rgba(0,0,0,0.25) 0 -5px 10px;box-sizing:border-box;padding:20px;overflow:auto;-webkit-overflow-scrolling:touch;position:absolute;left:0;bottom:40px;height:50vh;width:100vh;-webkit-transform:translate(0, 100vh);-ms-transform:translate(0, 100vh);transform:translate(0, 100vh);transition:all .2s ease;z-index:1}.site-navigation input[type="checkbox"]:checked~ul{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);transform:translate(0, 0)}}.site-content h1{padding-top:40px;position:relative}.site-content h1:after{border:1px solid #ddd;border-bottom:none;content:"";display:block;height:8px;position:absolute;left:0;top:0;width:100%}.site-content.chapters{counter-reset:chapter}.site-content.chapters h1{counter-increment:chapter;padding-top:60px}.site-content.chapters h1:before{display:inline-block;content:"Chapter " counter(chapter) ".";position:absolute;top:30px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);color:#999;font-size:12px;letter-spacing:1px;line-height:20px;text-transform:uppercase;text-align:center}.site-content #welcome ul{-webkit-columns:3;-moz-columns:3;columns:3;-webkit-column-gap:30px;-moz-column-gap:30px;column-gap:30px;list-style-position:inside}.site-content .back-to-top{margin-bottom:60px}@media (max-width:870px){.site-content #welcome ul{-webkit-columns:2;-moz-columns:2;columns:2}}@media (max-width:600px){.site-content #welcome ul{-webkit-columns:1;-moz-columns:1;columns:1}}.site-footer{border-top:1px solid #ccc;margin:60px auto 0 auto;padding:40px 20px;font-family:verdana,sans-serif;font-size:16px;text-align:center}.site-footer .cc-badge{background-image:url();background-position:top left;background-repeat:no-repeat;background-size:contain;display:inline-block;height:31px;width:88px}.site-footer h2{font-size:24px;font-weight:bold;line-height:30px;margin-bottom:10px}.site-footer ul{list-style:none;margin:0 0 20px 0;padding:0}.site-footer .license{color:#777;font-size:13px}
        </style>
    </head>
    <body>
        <header class="site-header">
            <h1><a href="/">PHP <em>The Right Way</em></a></h1>
            <div class="build-date">Last Updated: {{ site.time | date: "%F %R" }}</div>
            <div class="share">
                <a class="btn-share" href="https://twitter.com/intent/tweet?text=PHP+The+Right+Way&amp;url=http%3A%2F%2Fwww.phptherightway.com&amp;hashtags=PHP" target="_blank">Share on Twitter</a>
            </div>
            <a class="fork-me" href="https://github.com/laravel-china/php-the-right-way" target="_blank"></a>
        </header>

        <nav class="site-navigation">
            <input type="checkbox" id="toggle"/>
            <label for="toggle">Table of Contents</label>
            <ul>
                <li><a href="/#welcome">Welcome</a>
                    <ul>
                        <li><a href="{{ site.baseurl }}#translations">翻译</a></li>
                        <li><a href="{{ site.baseurl }}#how-to-contribute">如何贡献</a></li>
                        <li><a href="{{ site.baseurl }}#spread-the-word">推广</a></li>
                    </ul>
                </li>
                {% assign lastIsChild = false %}
                {% for post in site.posts reversed %}
                    {% if post.isChild != true %}
                        {% if insideSection %}
                            </ul>
                            </li>
                            {% assign insideSection = false %}
                        {% endif %}
                    {% endif %}
                    <li><a href="{{ site.baseurl }}#{{ post.anchor }}">{{ post.title }}</a>
                    {% if post.isChild %}
                        </li>
                    {% else %}
                        <ul>
                        {% assign insideSection = true %}
                    {% endif %}
                    {% assign lastIsChild = post.isChild %}
                {% endfor %}
                    </ul>
                </li>
                <li><a href="/#credits">Credits</a></li>
            </ul>
        </nav>

        <div class="site-content chapters">
            {{ content }}
        </div>

        <footer class="site-footer" id="credits">
            <h2>Created and maintained by</h2>
            <ul>
                <li><a href="http://joshlockhart.com" target="_blank">Josh Lockhart</a></li>
                <li><a href="http://philsturgeon.co.uk/" target="_blank">Phil Sturgeon</a></li>
                <li><a href="https://github.com/codeguy/php-the-right-way/graphs/contributors" target="_blank">Project Contributors</a></li>
            </ul>
            <div class="license">
                <a class="cc-badge" rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"></a>
                <br />
                <span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text" property="dct:title" rel="dct:type">PHP: The Right Way</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://joshlockhart.com" property="cc:attributionName" rel="cc:attributionURL">Josh Lockhart</a>
                <br/>
                is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="http://www.phptherightway.com" rel="dct:source">www.phptherightway.com</a>.
            </div>
        </footer>
        <script>
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-362072-7']);
        _gaq.push(['_trackPageview']);
        (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
        </script>
    </body>
</html>
